/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

/**
 *
 * @author calandreli
 */
import generica.Generica;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name = "tipo")
@SequenceGenerator(name = "tipo_seq", sequenceName = "id_Tipo", allocationSize = 1)
public class Tipo implements Generica {

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tipo_seq")
    @Column(name = "id_Tipo")
    private int id_Tipo;
    @Column(name = "nome")
    private String nome;

    public int getId_Tipo() {
        return id_Tipo;
    }

    public void setId_Tipo(int id_Tipo) {
        this.id_Tipo = id_Tipo;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    @Override
    public Serializable getIdentificador() {
        return this.getId_Tipo();
    }

    @Override
    public String toString() {
        return  nome;
    }

    
}
